package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.system.api.factory.RemoteAubitFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteAubitService", value = ServiceNameConstants.MODULARBUSINESS_SERVICE, fallbackFactory = RemoteAubitFallbackFactory.class)
public interface RemoteAubitService {
    /**
     * 根据工号查询假期上级ID
     *
     * @param code 工号
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/auditfieldbody/selectAubitFieldbody_topid")
    public List<?> selectAubitFieldbody_topid(@RequestBody String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 批量新增
     *
     * @param aubitFieldbody 对象集合
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping("/auditfieldbody/batchSave")
    public Long batchSave(@RequestBody List<?> aubitFieldbody, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


}
